repo: Add `require_rev` method
authorColin Walters <walters@verbum.org>
Fri, 22 Oct 2021 13:38:09 +0000 (09:38 -0400)
committerColin Walters <walters@verbum.org>
Fri, 6 May 2022 16:53:57 +0000 (12:53 -0400)
commit440d872f68dcfbf39f3adb6cb6b68bb410306d06
tree87bc9b79b0ff2f2ca62333d3adc0f710627d2f24
parentfaaf0457fdfd9a2f6d7a88b5f9a2f76b7964f368
repo: Add `require_rev` method

The `resolve_rev` C method should really have been
`resolve_rev_optional` from the start - it is more obviously wrong
in Rust because the input parameter `allows_noent` controls
whether the returned `Option` can ever be `None`.

I debated adding this to the C bindings, and may still do so,
but eh it's faster to write + ship in Rust, and the future of ostree is
Rust anyways.
rust-bindings/rust/src/repo.rs
rust-bindings/rust/tests/repo/mod.rs